import axios from "axios"

  //  根据用户最近加入播放列表的音乐进行推荐(ItemCF)
async function LastPlayListRce(){
  var result
  await axios({
      baseURL: 'api/recommend/lastplaylist/rec',
      method: 'get',
  }).then(res => {
      result=res.data
      console.log(result);
  })
  return result
}

//    根据用户最近关注好友推荐（UserCF）
async function LastFollowRce(){
  var result
  await axios({
      baseURL: 'api/recommend/lastfollow/rec',
      method: 'get',
  }).then(res => {
      result=res.data
      console.log(result);
  })
  return result
}

async function CommonFollowPlayListRec(){
  var result
  await axios({
      baseURL: 'api/recommend/common/follow/playlist',
      method: 'get',
  }).then(res => {
      result=res.data
      console.log(result);
  })
  return result
}

async function FollowPlayListRec(){
  var result
  await axios({
      baseURL: 'api/recommend/followplaylist',
      method: 'get',
  }).then(res => {
      result=res.data
      console.log(result);
  })
  return result
}


export default {
  name: 'RecommendAPI',
  LastPlayListRce,
  LastFollowRce,
  CommonFollowPlayListRec,
  FollowPlayListRec,

}




